package com.project_test.kun.travelling_1st.HomePage.category;

import org.json.JSONException;
import org.json.JSONObject;

import java.io.Serializable;

/**
 *  Created by Administrator on 16-10-17.
 */
public class HomePListItemIndex implements Serializable{

    private int pic_s2_id;
    private int pic_s1_id;
    private int pic_big_id;
    private int id;
    private String pic_big;
    private String pic_s1;
    private String pic_s2;
    private String title;
    private String sub_title;
    private String pic_title;

    public void pashJson(JSONObject json) throws JSONException {
//        "pic_s2_id": "164",
        pic_s2_id = json.optInt("pic_s2_id");
//                "pic_s1_id": "173",
        pic_s1_id = json.optInt("pic_s1_id");
//                "pic_big_id": "216",
        pic_big_id = json.optInt("pic_big_id");
//                "id": "18",
        id = json.getInt("id");
//                "pic_big": "http://img3.handybest.com/Uploads/app/index/14701916019988.jpg!phone",
        pic_big = json.getString("pic_big");
//                "pic_s1": "http://img3.handybest.com/Uploads/app/index/14701918282631.jpg!phone",
        pic_s1 = json.getString("pic_s1");
//                "pic_s2": "http://img1.handybest.com/Uploads/app/index/1470191873545.jpg!phone",
        pic_s2 = json.getString("pic_s2");
//                "title": "“七夕，任性爱”主题活动",
        title = json.getString("title");
//                "sub_title": "“七夕，任性爱”主题活动",
        sub_title = json.getString("sub_title");
//                "pic_title": "http://img2.handybest.com/Uploads/app/index/14703869189061.jpg!phone"
        pic_title = json.optString("pic_title");
    }

    public int getPic_s2_id() {
        return pic_s2_id;
    }

    public int getPic_s1_id() {
        return pic_s1_id;
    }

    public int getPic_big_id() {
        return pic_big_id;
    }

    public int getId() {
        return id;
    }

    public String getPic_big() {
        return pic_big;
    }

    public String getPic_s1() {
        return pic_s1;
    }

    public String getPic_s2() {
        return pic_s2;
    }

    public String getTitle() {
        return title;
    }

    public String getSub_title() {
        return sub_title;
    }

    public String getPic_title() {
        return pic_title;
    }

    @Override
    public String toString() {
        return "HomePListItemIndex{" +
                "pic_s2_id=" + pic_s2_id +
                ", pic_s1_id=" + pic_s1_id +
                ", pic_big_id=" + pic_big_id +
                ", id=" + id +
                ", pic_big='" + pic_big + '\'' +
                ", pic_s1='" + pic_s1 + '\'' +
                ", pic_s2='" + pic_s2 + '\'' +
                ", title='" + title + '\'' +
                ", sub_title='" + sub_title + '\'' +
                ", pic_title='" + pic_title + '\'' +
                '}';
    }
}
